<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>本站概况</title>

    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="icon" type="image/ico" href="https://hellohao.nos-eastchina1.126.net/BlogImg/favicon.ico"/>
    <link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/static/css/font-awesome.css}" rel="stylesheet">
    <link th:href="@{/static/css/custom.css}" rel="stylesheet">
    <link th:href="@{/static/css/animate.css}" rel="stylesheet">
    <link th:href="@{/static/css/style.css}" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="row" style="width: 95%; margin: 0 auto;margin-top: 50px;">
        <h2 class="font-bold">系统概况</h2>             
    </div>

    <div class="wrapper wrapper-content animated fadeInRight" >
        <div class="row" style="width: 95%; margin: 0 auto;">
            <div class="col-sm-3">
                <div class="widget style1 navy-bg">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="glyphicon glyphicon-picture" style="font-size: 4.0em;"></i>
                        </div>
                        <div class="col-xs-8 text-right">
                            <span> 本站累计图片总数 </span>
                            <h2 class="font-bold" id="counts">0</h2>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="widget style1 navy-bg">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="glyphicon glyphicon-user fa-5x" style="font-size: 4.0em;"></i>
                        </div>
                        <div class="col-xs-8 text-right">
                            <span> 用户总数 </span>
                            <h2 class="font-bold" id="getusertotal">0</h2>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-sm-3">
                <div class="widget style1 yellow-bg">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="glyphicon glyphicon-remove-sign fa-5x" style="font-size: 4.0em;"></i>
                        </div>
                        <div class="col-xs-8 text-right">
                            <span>非法图片拦截 </span>
                            <h2 class="font-bold" id="imgreviewcount">0</h2>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-sm-3">
                <div class="widget style1 lazur-bg">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="glyphicon glyphicon-tasks fa-5x" style="font-size: 4.0em;"></i>
                        </div>
                        <div class="col-xs-8 text-right">
                            <span>对象存储源 </span>
                            <h2 class="font-bold" id="source">未知</h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        </div>
        <div class="row"  style="width: 95%; margin: 0 auto;">
                <h2 class="font-bold">我的信息</h2>             
            </div>
        <div class="row"  style="width: 95%; margin: 0 auto;">
            <div class="col-sm-6">
                <div class="widget navy-bg no-padding">
                    <div class="p-m">
                        <h1 class="m-xs" th:text="'Hi~'+${username}"></h1>
                        <h3 class="font-bold no-margins" id="ly">
                            欢迎你的到来！如果遇到问题，可以联系管理员咨询。
                        </h3>
                        <small> </small>
                    </div>
                    <div class="flot-chart">
                        <div class="flot-chart-content" id="flot-chart1"></div>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="widget lazur-bg no-padding">
                    <div class="p-m">
                        <h1 class="m-xs" id="usercount">0</h1>

                        <h3 class="font-bold no-margins">
                            我的图片总数
                        </h3>
                        <small></small>
                    </div>
                    <div class="flot-chart">
                        <div class="flot-chart-content" id="flot-chart2"></div>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="widget yellw-bg no-padding">
                        <table class="table" >
                                <tbody>
                                    <tr>
                                        <td>
                                            <button type="button" class="btn btn-danger m-r-sm">系统名称：</button>
                                            <span th:text="${sysetmname}" style="font-weight: bold;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                            <td>
                                                <button type="button" class="btn btn-info m-r-sm">系统架构：</button>
                                                <span th:text="${isarch}" style="font-weight: bold;"></span>
                                            </td>
                                    </tr>
                                    <tr>
                                            <td>
                                                <button type="button" class="btn btn-info m-r-sm">JDK版本：</button>
                                                <span th:text="${jdk}" style="font-weight: bold;"></span>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <button type="button" class="btn btn-info m-r-sm">开发语言：</button>
                                            <span  style="font-weight: bold;">JAVA开发</span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                </div>
            </div>
        </div>
        <div class="row">
            
        </div>

    <!-- 全局js -->
    <script th:src="@{/static/js/jquery-3.4.1.min.js}" type="text/javascript"></script>
    <script th:src="@{/static/js/jquery-ui-1.10.4.min.js}" type="text/javascript"></script>
    <script th:src="@{/static/js/bootstrap.min.js}" type="text/javascript"></script>
    <!-- 自定义js -->
    <script th:src="@{/static/js/content.js}" type="text/javascript"></script>
    <script th:src="@{/static/js/jquery.flot.js}" type="text/javascript"></script>
    <script>

        $(function () {
            //获取本站概况
            $.ajax({
                type: "POST",
                url: "/admin/getwebconfig",
                dataType: "json",
                success: function (data) {
                    $("#counts").text(data.counts);
                    $("#getusertotal").text(data.getusertotal);
                    $("#imgreviewcount").text(data.imgreviewcount);
                    $("#usercount").text(data.usercount);
                    var str = "";
                    if (data.source == 1) {
                        str = "网易NOS";
                    } else if (data.source == 2) {
                        str = "阿里OSS";
                    } else if (data.source == 3) {
                        str = "又拍USS";
                    } else if (data.source == 4) {
                        str = '七牛KODO';
                    } else if (data.source == 5) {
                        str = '本地存储';
                    }else if (data.source == 6) {
                        str = '腾云COS';
                    }else {
                        str = '未知';
                    }
                    $("#source").text(str);
                }
            });
            // $.ajax({
            //     type: "GET",
            //     url: "/getsentence",
            //     dataType: "json",
            //     success: function (data) {
            //         $("#ly").text(data.hitokoto);
            //     }
            // });
        })


        $(document).ready(function () {
            var d1 = [ [1262304000000, 6], [1264982400000, 3057], [1267401600000, 20434], [1270080000000, 31982], [1272672000000, 26602], [1275350400000, 27826], [1277942400000, 24302], [1280620800000, 24237], [1283299200000, 21004], [1285891200000, 12144], [1288569600000, 10577], [1291161600000, 10295] ];
            var d2 = [ [1262304000000, 5], [1264982400000, 200], [1267401600000, 1605], [1270080000000, 6129], [1272672000000, 11643], [1275350400000, 19055], [1277942400000, 30062], [1280620800000, 39197], [1283299200000, 37000], [1285891200000, 27000], [1288569600000, 21000], [1291161600000, 17000] ];

            var data1 = [
                {
                    label: "Data 1",
                    data: d1,
                    color: '#17a084'
                },
                {
                    label: "Data 2",
                    data: d2,
                    color: '#127e68'
                }
            ];
            $.plot($("#flot-chart1"), data1, {
                xaxis: {
                    tickDecimals: 0
                },
                series: {
                    lines: {
                        show: true,
                        fill: true,
                        fillColor: {
                            colors: [ {
                                opacity: 1
                            }, {
                                opacity: 1
                            } ]
                        },
                    },
                    points: {
                        width: 0.1,
                        show: false
                    },
                },
                grid: {
                    show: false,
                    borderWidth: 0
                },
                legend: {
                    show: false,
                }
            });

            var data2 = [
                {
                    label: "Data 1",
                    data: d1,
                    color: '#19a0a1'
                }
            ];
            $.plot($("#flot-chart2"), data2, {
                xaxis: {
                    tickDecimals: 0
                },
                series: {
                    lines: {
                        show: true,
                        fill: true,
                        fillColor: {
                            colors: [ {
                                opacity: 1
                            }, {
                                opacity: 1
                            } ]
                        },
                    },
                    points: {
                        width: 0.1,
                        show: false
                    },
                },
                grid: {
                    show: false,
                    borderWidth: 0
                },
                legend: {
                    show: false,
                }
            });

            var data3 = [
                 {
                    label: "Data 1",
                    data: d1,
                    color: '#fbbe7b'
                },
                {
                    label: "Data 2",
                    data: d2,
                    color: '#f8ac59'
                }
            ];
            $.plot($("#flot-chart3"), data3, {
                xaxis: {
                    tickDecimals: 0
                },
                series: {
                    lines: {
                        show: true,
                        fill: true,
                        fillColor: {
                            colors: [ {
                                opacity: 1
                            }, {
                                opacity: 1
                            } ]
                        },
                    },
                    points: {
                        width: 0.1,
                        show: false
                    },
                },
                grid: {
                    show: false,
                    borderWidth: 0
                },
                legend: {
                    show: false,
                }
            });

            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });

            $(".todo-list").sortable({
                placeholder: "sort-highlight",
                handle: ".handle",
                forcePlaceholderSize: true,
                zIndex: 999999
            }).disableSelection();;

            var mapData = {
                "US": 498,
                "SA": 200,
                "CA": 1300,
                "DE": 220,
                "FR": 540,
                "CN": 120,
                "AU": 760,
                "BR": 550,
                "IN": 200,
                "GB": 120,
                "RU": 2000
            };

            $('#world-map').vectorMap({
                map: 'world_mill_en',
                backgroundColor: "transparent",
                regionStyle: {
                    initial: {
                        fill: '#e4e4e4',
                        "fill-opacity": 1,
                        stroke: 'none',
                        "stroke-width": 0,
                        "stroke-opacity": 0
                    }
                },
                series: {
                    regions: [ {
                        values: mapData,
                        scale: ["#1ab394", "#22d6b1"],
                        normalizeFunction: 'polynomial'
                    } ]
                },
            });
        });
        function times() {
            now = new Date(), hour = now.getHours()
            if (hour < 6) {
                return ("凌晨好！")
            } else if (hour < 9) {
                return ("早上好！")
            } else if (hour < 12) {
                return ("上午好！")
            } else if (hour < 14) {
                return ("中午好！")
            } else if (hour < 17) {
                return ("下午好！")
            } else if (hour < 19) {
                return ("傍晚好！")
            } else if (hour < 22) {
                return ("晚上好！")
            } else {
                return ("夜里好！")
            }
        }
    </script>

    
    

</body>

</html>
